Skip to content

AX-1941: add *.jfrog.io to workspace sandbox allowlist (with code review fixes) - #80

Open
MatanEden1 wants to merge 5 commits into
mainfrom
ax-1941-code-review-fixes
Open

AX-1941: add *.jfrog.io to workspace sandbox allowlist (with code review fixes)#80
MatanEden1 wants to merge 5 commits into
mainfrom
ax-1941-code-review-fixes

Conversation

@MatanEden1

Copy link
Copy Markdown
Contributor

Summary

Adds a workspace .cursor/sandbox.json to unblock *.jfrog.io inside Cursor's Agents Window (CURSOR_SANDBOX=seatbelt) sandbox, and a probe script to verify the fix.

This is a revised version of #79 with all code review findings addressed.

Changes

  • .cursor/sandbox.json — workspace network allowlist adding *.jfrog.io
  • scripts/test-sandbox-network.sh — probe script to verify the fix from inside the Agents Window

Code review fixes (vs #79)

  • sandbox.json: Removed "default": "deny" — workspace allow entries are unioned with Cursor's defaults; the explicit deny directive risked replacing them entirely rather than extending them.
  • test-sandbox-network.sh: Replaced example.com deny-hosts with 203.0.113.1 (RFC 5737 TEST-NET-3) and dns-test.blocked.invalid (RFC 2606 .invalid TLD) — structurally guaranteed unreachable, immune to future Cursor allow-list changes.
  • test-sandbox-network.sh: Added proxy env-vars guard — exits 2 when CURSOR_SANDBOX=seatbelt but neither HTTPS_PROXY nor HTTP_PROXY is set (curl would bypass the sandbox proxy and make every host look reachable).
  • test-sandbox-network.sh: Added want-argument validation in probe() to catch typos early.
  • test-sandbox-network.sh: Corrected the curl "000" comment and clarified why ((fail++)) || true needs || true under set -e.

Test plan

Run scripts/test-sandbox-network.sh from inside the Agents Window after applying this change. Exit 0 = all hosts behaved as expected, exit 1 = one or more failures, exit 2 = not running inside the sandbox.

Closes #78

Made with Cursor

MatanEden1 and others added 5 commits August 27, 2026 17:47
Co-authored-by: Cursor <cursoragent@cursor.com>
- Revert the 403-as-blocked change: a server-side 403 means the CONNECT
  tunnel succeeded and the host IS reachable. Only HTTP 000 means blocked.
- Use arithmetic (( blocked )) instead of string comparison.
- Print HTTPS_PROXY in env diagnostics (all probed URLs are HTTPS).

Co-authored-by: Cursor <cursoragent@cursor.com>
Do not append 000 when curl exits 56; that concatenated to 000000 and treated a CONNECT drop as reachable.

Co-authored-by: Cursor <cursoragent@cursor.com>
- sandbox.json: add explicit "default": "deny" for clarity
- test script: add DENY_HOSTS probe for negative coverage
- test script: remove 2>/dev/null so curl errors are visible
- test script: add --connect-timeout 3 for fast failure on blocked hosts

Co-authored-by: Cursor <cursoragent@cursor.com>
- sandbox.json: remove "default":"deny" — workspace allow entries are unioned
  with Cursor's defaults; an explicit deny directive risked replacing them
- test script: replace example.com deny-hosts with RFC 5737 (203.0.113.1) and
  RFC 2606 (.invalid TLD) addresses that are structurally guaranteed unreachable,
  preventing future false failures if Cursor's defaults ever include example.com
- test script: add proxy env-vars guard — exit 2 when CURSOR_SANDBOX=seatbelt
  but neither HTTP_PROXY nor HTTPS_PROXY is set (curl would bypass the proxy,
  making every host look reachable)
- test script: add want-argument validation in probe() to catch typos early
- test script: clarify the curl "000" and ((fail++)) || true comments

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant